package org.kfive.nova.design.behavior.Command;

/**
 * Created with IntelliJ IDEA.
 * User: admin
 * Date: 15-7-8
 * Time: 下午10:27
 * To change this template use File | Settings | File Templates.
 */
public class Client {

    public static void main(String [] args){
        Light light = new Light();
        LightOnCommand lightOnCommand = new LightOnCommand(light);
        LightOffCommand lightOffCommand = new LightOffCommand(light);

        Invoker invoker = new Invoker();
        invoker.setCommand(lightOnCommand);
        invoker.action();

        invoker.setCommand(lightOffCommand);
        invoker.action();
    }
}
